package com.itheima.exerciseTest.method20_29.method26;

public class Demo {
    public static void main(String[] args) {
        Storefront sf = new Storefront();

        Cooker c = new Cooker(sf);
        for (int i = 1; i < 10; i++) {
            Thread thread = new Thread(c);
            thread.setName(i + "");
            thread.start();
        }

        Foodie f = new Foodie(sf);
        for (int i = 1; i < 10; i++) {
            Thread thread = new Thread(f);
            thread.setName(i + "");
            thread.start();
        }
    }
}
